#include <iostream>
#include"list.h"
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
	
    while(true)
    {
    	cout << "欢迎使用计算器" << endl;
		cout << "如果想要退出，输入：exit即可" << endl;
		
		string str1; 
    	cin >> str1;
    	
    	if(str1 == string("exit"))
    	{
    		cout << "感谢您的使用，程序已关闭。" << endl;
    		break;
		}
		else
		{
			cout << "输入的中缀表达式所对应的后缀表达式为：" << " " << change(str1) << endl;
            string str2 = change(str1);
            compute(str2);
		}
	}

	
	
	return 0;
}
